package org.bcncoding.appengine.droiding.server.entity;

import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NullValue;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.Unique;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class ServiceProvider {
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id = null;

	@Persistent(nullValue = NullValue.EXCEPTION)
	private String name = null;
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	@Unique
	private String key = null;
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	private SystemType type = null;
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	private String location = null;
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	private Double latitude = null;
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	private Double longitude = null;	
	
	@Persistent(nullValue = NullValue.EXCEPTION)
	private Integer zoomLevel = null;
	
	@Persistent(mappedBy="provider")
	private List<Station> stations = null;
	
	public Key getId() {
		return id;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getKey() {
		return key;
	}


	public void setKey(String key) {
		this.key = key;
	}


	public SystemType getType() {
		return type;
	}


	public void setType(SystemType type) {
		this.type = type;
	}


	public String getLocation() {
		return location;
	}


	public void setLocation(String location) {
		this.location = location;
	}


	public Double getLatitude() {
		return latitude;
	}


	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}


	public Double getLongitude() {
		return longitude;
	}


	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}


	public Integer getZoomLevel() {
		return zoomLevel;
	}


	public void setZoomLevel(Integer zoomLevel) {
		this.zoomLevel = zoomLevel;
	}


	public List<Station> getStations() {
		return stations;
	}


	public void setStations(List<Station> stations) {
		this.stations = stations;
	}

	
}
